import React, { Component } from 'react'

export default class App extends Component {
  render() {
    return (
      <div>
        <Child>
            <div>插槽</div>
            <div>插槽2</div>
        </Child>
      </div>
    )
  }
}

class Child extends Component{
    render(){
        return(
            <div>
                Child
                {/* 插槽：this.props.children */}
                {this.props.children}
            </div>
        )
    }
}
// 为了复用
// 减少父子通信